package com.zrt.view;

import org.springframework.stereotype.Controller;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

@Controller
public class AddStudent extends JDialog implements ActionListener {
    JLabel jl1, jl2, jl3, jl4, jl5, jl6, jl7, jl8;
    JTextField jtf1, jtf2, jtf3, jtf4, jtf5, jtf6, jtf7, jtf8;
    JButton jb1;


    public void myAddStudent() {
        jl1 = new JLabel("学号");
        jl1.setBounds(20, 20, 100, 35);
        jl1.setFont(new Font("宋体", Font.BOLD, 25));
        add(jl1);

        jtf1 = new JTextField();
        jtf1.setBounds(100, 20, 120, 35);
        jtf1.setFont(new Font("宋体", Font.BOLD, 20));
        add(jtf1);

        jl2 = new JLabel("姓名");
        jl2.setBounds(20, 70, 100, 35);
        jl2.setFont(new Font("宋体", Font.BOLD, 25));
        add(jl2);

        jtf2 = new JTextField();
        jtf2.setBounds(100, 70, 120, 35);
        jtf2.setFont(new Font("宋体", Font.BOLD, 20));
        add(jtf2);

        jl3 = new JLabel("性别");
        jl3.setBounds(20, 120, 100, 35);
        jl3.setFont(new Font("宋体", Font.BOLD, 25));
        add(jl3);

        jtf3 = new JTextField();
        jtf3.setBounds(100, 120, 120, 35);
        jtf3.setFont(new Font("宋体", Font.BOLD, 20));
        add(jtf3);

        jl4 = new JLabel("年龄");
        jl4.setBounds(20, 170, 100, 35);
        jl4.setFont(new Font("宋体", Font.BOLD, 25));
        add(jl4);

        jtf4 = new JTextField();
        jtf4.setBounds(100, 170, 120, 35);
        jtf4.setFont(new Font("宋体", Font.BOLD, 20));
        add(jtf4);


        jl5 = new JLabel("类    别");
        jl5.setBounds(250, 20, 180, 35);
        jl5.setFont(new Font("宋体", Font.BOLD, 25));
        add(jl5);

        jtf5 = new JTextField();
        jtf5.setBounds(390, 20, 120, 35);
        jtf5.setFont(new Font("宋体", Font.BOLD, 20));
        add(jtf5);

        jl6 = new JLabel("每小时酬劳");
        jl6.setBounds(250, 70, 180, 35);
        jl6.setFont(new Font("宋体", Font.BOLD, 25));
        add(jl6);

        jtf6 = new JTextField();
        jtf6.setBounds(390, 70, 120, 35);
        jtf6.setFont(new Font("宋体", Font.BOLD, 20));
        add(jtf6);

        jl7 = new JLabel("每月酬劳");
        jl7.setBounds(250, 120, 180, 35);
        jl7.setFont(new Font("宋体", Font.BOLD, 25));
        add(jl7);

        jtf7 = new JTextField();
        jtf7.setBounds(390, 170, 120, 35);
        jtf7.setFont(new Font("宋体", Font.BOLD, 20));
        add(jtf7);

        jl8 = new JLabel("学    费");
        jl8.setBounds(250, 170, 180, 35);
        jl8.setFont(new Font("宋体", Font.BOLD, 25));
        add(jl8);

        jtf8 = new JTextField();
        jtf8.setBounds(390, 120, 120, 35);
        jtf8.setFont(new Font("宋体", Font.BOLD, 20));
        add(jtf8);

        jb1 = new JButton("确认");
        jb1.setBounds(200, 250, 100, 35);
        jb1.setFont(new Font("宋体", Font.PLAIN, 25));
        add(jb1);

        setTitle("电子科技大学成都学院财务管理系统");
        setLayout(null);
        setSize(550, 350);
        setLocation(550, 250);
        setResizable(false);
        setModal(true);
        setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
        setVisible(true);
    }

    @Override
    public void actionPerformed(ActionEvent e) {

    }
}
